package mmpathgen.controlflowanalysis;

import org.junit.Test;

import soot.toolkits.graph.UnitGraph;

public class ControlFlowAnalysisTest {

	@Test
	public void testPrintCFGAsDotByBriefUnitGraph() {
		// fail("Not yet implemented");
		String packageName = "jtopas";
		String className = "ContentsExtractor";
		String methodName = "main";

		UnitGraph g = CFGGenByBriefUnitGraph.cfgGen(packageName + "."
				+ className, methodName);
		ControlFlowAnalysis.printCFGAsDot(g, packageName + "." + className,
				methodName);

	}

	@Test
	public void testPrintCFGAsDotByExceptionalUnitGraph() {
		// fail("Not yet implemented");
		String packageName = "jtopas";
		String className = "ContentsExtractor";
		String methodName = "main";

		UnitGraph g = CFGGenByExceptionalUnitGraph.cfgGen(packageName + "."
				+ className, methodName);
		ControlFlowAnalysis.printCFGAsDot(g, packageName + "." + className,
				methodName);

	}

	@Test
	public void testPrintCFGAsDotByTrapUnitGraph() {
		// fail("Not yet implemented");
		String packageName = "jtopas";
		String className = "ContentsExtractor";
		String methodName = "main";

		UnitGraph g = CFGGenByTrapUnitGraph.cfgGen(packageName + "."
				+ className, methodName);
		ControlFlowAnalysis.printCFGAsDot(g, packageName + "." + className,
				methodName);

	}

}
